package com.alstudio.utils.distributor.versioncheck;

import java.io.Serializable;

import com.alstudio.net.protocol.xmpp.data.ServerInfo;

public class CheckNewVersionResult extends ServerInfo implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -4080209342141963306L;

	/* 当前最新发行版本号 */
	private String latestVer = "";
	/* 版本更新内容 */
	private String whatsNew = "";
	/* 新版本下载地址 */
	private String newVerUrl = "";
	// 是否强制更新
	private boolean forceUpdate = false;

	private ServerInfo mServerInfo;

	private boolean isForVersionCheck = false;

	private boolean isFillValue = false;

	private boolean isSuccessed = false;

	private String errorMsg;

	/**
	 * 设定最新版本的更新说明
	 * 
	 * @param tips
	 *            更新说明
	 * @author Alonso Lee
	 */
	public void setWhatsNew(String tips) {
		this.whatsNew = tips;
	}

	/**
	 * 获取最新版本的更新说明
	 * 
	 * @return 更新说明
	 * @author Alonso Lee
	 */
	public String getWhatsNew() {
		return this.whatsNew;
	}

	/**
	 * 设定当前最新的发行版本
	 * 
	 * @param version
	 * @author Alonso Lee
	 */
	public void setLatestVer(String version) {
		this.latestVer = version;
	}

	/**
	 * 获取当前最新的发型版本号
	 * 
	 * @return 最新发行版本号
	 * @author Alonso Lee
	 */
	public String getLatestVer() {
		return this.latestVer;
	}

	/**
	 * 设定最新版本下载地址
	 * 
	 * @param url
	 *            最新版本下载地址
	 * @author Alonso Lee
	 */
	public void setNewVersionUrl(String url) {
		this.newVerUrl = url;
	}

	/**
	 * 返回最新版本下载地址
	 * 
	 * @return 最新版本下载地址
	 * @author Alonso Lee
	 */
	public String getNewVersionUrl() {
		return this.newVerUrl;
	}

	/**
	 * 甚至是否需要强制更新
	 * 
	 * @param forceUpdate
	 *            true 需要强制更新
	 */
	public void setForceUpdateState(boolean forceUpdate) {
		this.forceUpdate = forceUpdate;
	}

	/**
	 * 检查是否需要强制更新
	 * 
	 * @return
	 */
	public boolean isForceUpdate() {
		return forceUpdate;
	}

	public void setServerInfo(ServerInfo info) {
		mServerInfo = info;
	}

	public ServerInfo getServerInfo() {
		return mServerInfo;
	}

	public void setIsForVersionCheck(boolean c) {
		this.isForVersionCheck = c;
	}

	public boolean isForVersionCheck() {
		return this.isForVersionCheck;
	}

	public void setIsFillValue(boolean f) {
		this.isFillValue = f;
	}

	public boolean isFillValue() {
		return this.isFillValue;
	}

	public void setIsSuccessed(boolean s) {
		this.isSuccessed = s;
	}

	public boolean isSuccessed() {
		return this.isSuccessed;
	}

	public void setErrorMessage(String msg) {
		this.errorMsg = msg;
	}

	public String getErrorMessage() {
		return this.errorMsg;
	}
}
